package com.woniuxy.joylifeshop;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@EnableFeignClients(basePackages = "com.woniuxy.joylifeshop.feign")
@EnableEurekaClient
@MapperScan("com.woniuxy.common.mapper")
@EnableWebSocket
@SpringBootApplication
public class JoylifeShopApplication {

    public static void main(String[] args) {
        SpringApplication.run(JoylifeShopApplication.class, args);
    }
    //在容器中创建bean对象，因为在ChatUtil工具类中需要用的RemoteEndpoint对象
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }

}
